import Vue from 'vue'
import vuex from 'vuex'
import vuexPersistedstate from 'vuex-persistedstate'

Vue.use(vuex)

import app from './modules/app'
import user from './modules/user'
import stores from './modules/stores'

const store = new vuex.Store({
    plugins: [vuexPersistedstate({
        // storage: window.sessionStorage
        storage: window.localStorage
    })],
    modules: {
        app,
        user,
        stores
    }
})


export default store
